package com.fr.funglisoftproduction.flanders;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class Splashscreen extends Activity {	
	private Intent toMainMenu;
	private Runnable goToMainMenu;
	private static final int DISPLAY_TIME = 2000;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	// Comportement de base
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splashscreen);
        
        // Initialisation des variables d'instance
        toMainMenu = new Intent(this, MainMenu.class);
        goToMainMenu = new Runnable()
        {
        	public void run()
        	{
                startActivity(toMainMenu);
        	}
        };
        
        // Dans 2 secondes, aller vers le MainMenu
        new Handler().postDelayed(goToMainMenu, DISPLAY_TIME);
    }
}